# !/usr/bin/env python
"""
    map
    ~~~~~~~


    :Author: swq
    :Date: 2021/07/04 18:45 
"""
from flask import Blueprint
from flask import render_template
from api import app

api = Blueprint(name="map", import_name=__name__)


@api.route('/sitemap', methods=['GET'])
def routers():
    routes = [
        rule
        for rule in app.url_map.iter_rules()
        if not rule.rule.startswith('/_debug_toolbar')
    ]

    return render_template('sitemap.html', routes=routes)
